﻿using Share.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using static System.Runtime.InteropServices.JavaScript.JSType;

namespace Share.APIs;

public class QOrgInfo : IcbcApiRequest
{
    internal override string Url => "api/mybank/enterprise/allocationoffunds/qorginfo/V1";
    [JsonPropertyName("trans_code")] public string TransCode => "QORGINFO";
    [JsonPropertyName("tran_date")] public string TranDate { get; set; } = DateTime.Today.ToString("yyyyMMdd");
    [JsonPropertyName("tran_time")] public string TranTime { get; set; } = DateTime.Now.ToString("HHmmssfff");
    [JsonPropertyName("language")] public string? Language { get; set; } = "zh_CN";
    [JsonPropertyName("f_seq_no")] public string FSeqNo { get; set; } = UtilitiesService.GetFSeqNo();
    [JsonPropertyName("org_id")] public string OrgId { get; set; } = string.Empty;
}


public class QOrgInfoResponse : IcbcApiResponse
{
    [JsonPropertyName("org_id")] public string? OrgId { get; set; } = string.Empty;
    [JsonPropertyName("org_name")] public string? OrgName { get; set; } = string.Empty;
    [JsonPropertyName("member_no")] public string? MemberNo { get; set; } = string.Empty;
    [JsonPropertyName("member_name")] public string? MemberName { get; set; } = string.Empty;
    [JsonPropertyName("phone_no")] public string? PhoneNo { get; set; } = string.Empty;
    [JsonPropertyName("acct_no")] public string? AcctNo { get; set; } = string.Empty;
    [JsonPropertyName("acct_name")] public string? AcctName { get; set; } = string.Empty;
    [JsonPropertyName("bank_no")] public string? BankNo { get; set; } = string.Empty;
    [JsonPropertyName("bank_name")] public string? BankName { get; set; } = string.Empty;
    [JsonPropertyName("lo_flag")] public string? LoFlag { get; set; } = string.Empty;
    [JsonPropertyName("mng_card_no")] public string? MngCardNo { get; set; } = string.Empty;
    [JsonPropertyName("upper_org_id")] public string? UpperOrgId { get; set; } = string.Empty;
    [JsonPropertyName("member_type")] public string? MemberType { get; set; } = string.Empty;
    [JsonPropertyName("certificate_type")] public string? CertificateType { get; set; } = string.Empty;
    [JsonPropertyName("certificate_id")] public string? CertificateId { get; set; } = string.Empty;
    [JsonPropertyName("corp_repre_name")] public string? CorpRepreName { get; set; } = string.Empty;
    [JsonPropertyName("corp_repre_id_type")] public string? CorpRepreIdType { get; set; } = string.Empty;
    [JsonPropertyName("corp_repre_id")] public string? CorpRepreId { get; set; } = string.Empty;
    [JsonPropertyName("corp_repre_sign_date")] public string? CorpRepreSignDate { get; set; } = string.Empty;
    [JsonPropertyName("deal_name")] public string? DealName { get; set; } = string.Empty;
    [JsonPropertyName("mer_ename")] public string? MerEname { get; set; } = string.Empty;
    [JsonPropertyName("mer_shname")] public string? MerShname { get; set; } = string.Empty;
    [JsonPropertyName("sale_dep_name")] public string? SaleDepName { get; set; } = string.Empty;
    [JsonPropertyName("shop_addr")] public string? ShopAddr { get; set; } = string.Empty;
    [JsonPropertyName("post_code")] public string? PostCode { get; set; } = string.Empty;
    [JsonPropertyName("link_code")] public string? LinkCode { get; set; } = string.Empty;
    [JsonPropertyName("e_mail")] public string? EMail { get; set; } = string.Empty;
    [JsonPropertyName("reg_amt")] public string? RegAmt { get; set; } = string.Empty;


}
